/*
 * DataSender.h
 *
 *  Created on: Jan 18, 2009
 *      Author: Andrzej Olchawa
 *      mailto: andrzejolchawa@gmail.com
 *      http://www.hardtechnology.org
 *      This is a part of the Armazd project, which is covered by
 *      GNU GPL v2 license.
 */

#ifndef DATASENDER_H_
#define DATASENDER_H_

/* Include section */
#include <string>
#include <list>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <errno.h>

#include "DestinationHost.h"
#include "AgentException.h"
#include "DestinationsManager.h"
#include "HTFramework/HTConverter.h"

/* namespace declaration */
using namespace std;

/* DataSender class definition */
class DataSender : public DestinationsManager
{

private:

	/* Variables related with connection */
	int hSocket;
	struct hostent *pServer;
	struct sockaddr_in addr;

public:

	/* Constructors and destructor */
	DataSender();
	virtual ~DataSender();

	/* Functions related with connection and data sending */
	int sendData(string);

};

#endif /* DATASENDER_H_ */
